package oop5;

/**
 * @author oldliu
 * @since 1.0
 */
public class Penguin {
    private String name;
    private int health;
    private int love;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getHealth() {
        return health;
    }

    public void setHealth(int health) {
        if(health>100||health<0)
        {
            System.out.println("不合法");
            health=60;
        }
        this.health = health;
    }

    public int getLove() {
        return love;
    }

    public void setLove(int love) {
        this.love = love;
    }
}
